import 'package:flutter/material.dart';

class GradientContinueButton extends StatelessWidget {
  final bool isActive;
  final String text;
  final VoidCallback? onPressed;

  const GradientContinueButton({
    super.key,
    required this.isActive,
    required this.text,
    this.onPressed,
  });

  @override
  Widget build(BuildContext context) {
    return Container(
      width: MediaQuery.of(context).size.width - 64,
      height: 56,
      decoration: BoxDecoration(
        borderRadius: BorderRadius.circular(28),
        gradient:
            isActive
                ? const LinearGradient(
                  colors: [Color(0xFFE76DEE), Color(0xFFAF51FF)],
                  stops: [0.0, 0.8],
                  begin: Alignment(-0.8, -1.0),
                  end: Alignment(0.8, 1.0),
                )
                : const LinearGradient(
                  colors: [Color(0xFF292933), Color(0xFF292933)],
                ),
      ),
      child: Material(
        color: Colors.transparent,
        borderRadius: BorderRadius.circular(28),
        child: InkWell(
          borderRadius: BorderRadius.circular(28),
          onTap: onPressed,
          child: Center(
            child: Text(
              text,
              style: TextStyle(
                color: isActive ? Color(0xff12171A) : Color(0xff686877),
                fontSize: 16,
                fontWeight: FontWeight.w700,
              ),
            ),
          ),
        ),
      ),
    );
  }
}
